<?php /* Smarty version Smarty-3.0.7, created on 2017-05-27 10:28:10
         compiled from "C:\wamp\www\gongzhonghao.yuanfenba.net/modules/admin/tpl/pager.tpl" */ ?>
<?php /*%%SmartyHeaderCode:109545928e43a78bcc5-01439613%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '312a26af4059cde659603f0112f4025f1688d19a' => 
    array (
      0 => 'C:\\wamp\\www\\gongzhonghao.yuanfenba.net/modules/admin/tpl/pager.tpl',
      1 => 1495847668,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '109545928e43a78bcc5-01439613',
  'function' => 
  array (
  ),
  'has_nocache_code' => false,
)); /*/%%SmartyHeaderCode%%*/?>
<ul class="pagination">
    <?php if ($_smarty_tpl->getVariable('page_info')->value['end']>0){?>
        <li><a href="<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
1">第一页</a></li>
        <?php if ($_smarty_tpl->getVariable('page_info')->value['current']==1){?>
            <li class="disabled"><span>&laquo;</span></li>
        <?php }else{ ?>
            <li><a href="<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
<?php echo $_smarty_tpl->getVariable('page_info')->value['prev'];?>
">&laquo;</a></li>
        <?php }?>
        <?php  $_smarty_tpl->tpl_vars['current_page'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['current_page']->value = $_smarty_tpl->getVariable('page_info')->value['start'];
  if ($_smarty_tpl->getVariable('current_page')->value<=$_smarty_tpl->getVariable('page_info')->value['end']){ for ($_foo=true;$_smarty_tpl->getVariable('current_page')->value<=$_smarty_tpl->getVariable('page_info')->value['end']; $_smarty_tpl->tpl_vars['current_page']->value++){
?>
            <?php if ($_smarty_tpl->getVariable('page_info')->value['current']==$_smarty_tpl->tpl_vars['current_page']->value){?>
                <li class="active"><span><?php echo $_smarty_tpl->tpl_vars['current_page']->value;?>
<span class="sr-only">(current)</span></span></li>
            <?php }else{ ?>
                <li><a href="<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
<?php echo $_smarty_tpl->tpl_vars['current_page']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['current_page']->value;?>
</a></li>
            <?php }?>
        <?php }} ?>

        <?php if ($_smarty_tpl->getVariable('page_info')->value['end']<$_smarty_tpl->getVariable('page_info')->value['last']){?>
            <li class="active"><span>...<span class="sr-only">(current)</span></span></li>
        <?php }?>

        <?php if ($_smarty_tpl->getVariable('page_info')->value['current']==$_smarty_tpl->getVariable('page_info')->value['last']){?>
            <li class="disabled"><span>&raquo;</span></li>
        <?php }else{ ?>
            <li><a href="<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
<?php echo $_smarty_tpl->getVariable('page_info')->value['next'];?>
">&raquo;</a></li>
        <?php }?>
        <li><a href="<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
<?php echo $_smarty_tpl->getVariable('page_info')->value['last'];?>
">尾页</a></li>
    <?php }?>
    <li><span>共 <?php echo $_smarty_tpl->getVariable('page_info')->value['total'];?>
 条</span></li>
</ul>

<script type="text/javascript" language="JavaScript">
    function checkNext() {
        var page = $('.pagination input').val();
        if (page.match(/^\d.*$/)) {
            var url_pre = '<?php echo $_smarty_tpl->getVariable('page_info')->value['url_pre'];?>
';
            url_pre = html_decode(url_pre);
            window.location.href = url_pre + page;
        } else {
            alert('请输入正确的页面数！');
        }
    }

    function html_decode(str) {
        var s = "";
        if (str.length == 0) return "";
        s = str.replace(/&amp;/g, "&");
        s = s.replace(/&lt;/g, "<");
        s = s.replace(/&gt;/g, ">");
        s = s.replace(/&nbsp;/g, " ");
        s = s.replace(/&#39;/g, "\'");
        s = s.replace(/&quot;/g, "\"");
        s = s.replace(/<br\/>/g, "\n");
        return s;
    }
</script>
